package com.totoro.service.impl;

import com.totoro.mapper.AdminMapper;
import com.totoro.pojo.Admin;
import com.totoro.pojo.Seller;
import com.totoro.service.AdminService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author TOTORO
 * @date 2021/7/8 1:29
 */
@Service
public class AdminServiceImpl implements AdminService {

    @Autowired
    AdminMapper adminMapper;

    @Override
    public Integer addAdmin(Admin admin) {
        return adminMapper.addAdmin(admin);
    }

    @Override
    public Admin findAdminByPasswordAndPhone(String account, String phone) {
        return adminMapper.findAdminByPasswordAndPhone(account, phone);
    }

    @Override
    public Integer updateUserApplySeller(int uid, int status) {
        return adminMapper.updateUserApplySeller(uid, status);
    }

    @Override
    public Integer updateUserIsSeller(int uid) {
        return adminMapper.updateUserIsSeller(uid);
    }

    @Override
    public Integer addSeller(Seller seller) {
        return adminMapper.addSeller(seller);
    }

    @Override
    public Integer addShop(String shopName, int slid) {
        return adminMapper.addShop(shopName, slid);
    }

}
